package devices

import (
	"context"
	"device_srv/device"
	"device_srv/internal/dao"
	"device_srv/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type DevicesDeleteLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewDevicesDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DevicesDeleteLogic {
	return &DevicesDeleteLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// DevicesDelete 设备删除
func (l *DevicesDeleteLogic) DevicesDelete(in *device.DevicesDeleteRequest) (*device.DevicesDeleteResponse, error) {
	//调用业务逻辑
	_, err := dao.DevicesDelete(in)
	if err != nil {
		return nil, err
	}
	return &device.DevicesDeleteResponse{}, nil
}
